#include <iostream>
#include <mutex>
#include <thread>
using namespace std;

mutex mtx;
int cnt = 0;
void test()
{
    for (int index = 0; index != 100000; ++index)
    {
        ++cnt;
    }
}
int main()
{
    thread thA(test);
    thread thB(test);

    thA.join();
    thB.join();
    cout << "cnt = " << cnt << endl;
    return 0;
}
